﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity;

namespace Vit.Data
{
    public class DbConnectionVisitorManager
    {
        public static IEnumerable<IDbConnectionVisitor> Visitors
        {
            get
            {
                var visitors = UnityContainer.ResolveAll<IDbConnectionVisitor>();
                if (visitors != null)
                    return visitors.Cast<IDbConnectionVisitor>();
                return Enumerable.Empty<IDbConnectionVisitor>();
            }
        }

        public static IUnityContainer UnityContainer
        {
            get;
            set;
        }
    }
}
